package com.rexolar.openapi.exception;

import com.rexolar.openapi.enums.ErrorCodeEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * BaseOpenException
 *
 * @author zhusiyu
 **/
@Getter
@Setter
public class BaseException extends RuntimeException {
    /**
     * 错误码
     */
    private int errorCode;

    public BaseException(ErrorCodeEnum errorCodeEnum){
        super(errorCodeEnum.getMessage());
        this.errorCode = errorCodeEnum.getCode();
    }
}
